package com.sixth.service.impl;


import com.sixth.bean.common.BasePageInfo;
import com.sixth.bean.common.BasePageInfoVo;
import com.sixth.bean.vo.AdminRegionVo;
import com.sixth.mapper.MarketRegionMapper;
import com.sixth.service.AdminRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @ClassName AdminRegionServiceImpl
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/7 22:58
 **/
@Transactional
@Service
public class AdminRegionServiceImpl implements AdminRegionService {

    @Autowired
    MarketRegionMapper marketRegionMapper;

    //@PageInfoAdvice
    @Override
    public Object list() {
        BasePageInfoVo<AdminRegionVo> adminRegionVoBasePageInfoVo = new BasePageInfoVo<>();
        List<AdminRegionVo> adminRegionVos = marketRegionMapper.selectRegion();
        adminRegionVoBasePageInfoVo.setList(adminRegionVos);
        adminRegionVoBasePageInfoVo.setPage(1);
        adminRegionVoBasePageInfoVo.setLimit(1);
        adminRegionVoBasePageInfoVo.setTotal(31L);
        adminRegionVoBasePageInfoVo.setPages(1);

        return adminRegionVoBasePageInfoVo;
    }
}
